package base.math;

//最小公倍数
//lcm(a,b) * gcd(a,b) = a * b
//lcm(a,b) = a * b / gcd(a,b) = a / gcd(a,b) *b
public class LCM {
    public static int gcd(int a, int b) {
        return b != 0 ? gcd(b, a%b) : a;
    }

    public static int getLcm(int a, int b) {
        return a / gcd(a,b) * b;
    }

    public static void main(String[] args) {
        System.out.println(getLcm(10,24));
    }



}
